package com.bbznb.mapper;

import com.bbznb.entity.UserData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface UserDataMapper {

    @Select("SELECT * FROM user WHERE Username = #{username}")
    UserData selectByPrimaryKey(@Param("username") String s);

    @Select("select * from  user_profile where user_id = #{userId}")
    UserData select(Long userId);

    @Update("update user_profile as up  set up.age =#{age}, up.avatar_img =#{peopleUrl} where up.user_id = #{userId}  ")
    void updateimg(Integer age, String peopleUrl, Long userId);

    @Select("select user.Mobite from user where  Username = #{username}")
    String selectp(String username);
}
